#ifndef _IMAGE_H_
#define _IMAGE_H_

#include <string>
class Surface;
///////////////////////////////////////////////////////
///	\brief Abstract Class for interfacing with textures
///////////////////////////////////////////////////////
class Image
{
public:
    /**
     * Initialize class
     */
					Image();
    /**
     * Destroy class
     */
	virtual ~Image();

    /**
     * Load the image
     *  @param _File    File to load
     */
    virtual bool    Load(const std::string& _File);

	/**
     * Set the Surface
     *  @param 
     */
	virtual void	SetSurface(Surface* pSurf) { m_pSurf = pSurf; };

    /**
     * Update any book-keeping that needs to be done 
     *  example: updating flipping chain, AVI, etc
	 *  returns true if it hit the last frame of a chain
     */
	virtual bool    Tick() {	return true; };

    /**
     * Set the current texture to texture stage 
     *  @param _TexStage    Stage to set it to.
     */
    bool    SetTextureStage(unsigned int _TexStage);

    /// accessors
    const std::string&      GetFile() const { return m_File; };

	void					Refresh() { Load(m_File); };

	int						GetWidth() const { return m_Width; };
	int						GetHeight() const { return m_Height; };
	unsigned int			GetSortVal();
	virtual Surface*		GetSurface() { return m_pSurf; };
protected:
    std::string             m_File;     // name of file this was made from
	unsigned int			m_Width, m_Height;
	Surface*				m_pSurf;
};

#endif //_ABSTRACT_IMAGE_H_